package com.epam.lunch.service;

import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import javax.annotation.Resource;

import com.epam.lunch.domain.Address;
import com.epam.lunch.domain.BaseDomain;

@Resource
public class ReflectionApp {

	
	public static void main(String[] args) {

		HardCodedRestaurantRepository repo = new HardCodedRestaurantRepository();
		SystemOutMenuLister lister = new SystemOutMenuLister(repo);

		listAnnotations(lister);
		
		Address a1=new Address("Futrinka utca", "Budapest", "1111", "Hungary");
				System.out.println("address: " + a1);
		
		// lister.listMenus();
	}

	private static void listAnnotations(SystemOutMenuLister lister) {
		Annotation[] annotations = lister.getClass().getAnnotations();
		for (Annotation annotation : annotations) {
			System.out.println("next annot:" + annotation);
		}
	}
}
